﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PingGuPager.aspx.cs" Inherits="PropertyAppraisal.ProjectAppraisal.PingGuPager" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="/easyui/easyui/1.3.2/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/easyui/easyui/1.3.2/themes/icon.css" />
    <%--<script type="text/javascript" src="easyui/js/jquery-1.8.0.min.js"></script>--%>
    <script src="/easyui/easyui/1.3.2/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/easyui/easyui/1.3.2/jquery.easyui.min.js"></script>
    <script src="/easyui/easyui/1.3.2/easyloader.js"></script>
    <script type="text/javascript" src="../easyui/jquery.params.js"></script>
</head>
<body>
    <div class="demo-info">
        <div class="demo-tip icon-tip"></div>
        <%--<div>Fill the form and submit it.</div>--%>
    </div>
    <div style="margin: 0;"></div>
    <form id="form1" runat="server">
        <div class="easyui-panel" fit="true" style="border: none;">
            <div style="margin-left: 30px;" id="ff">
                <table>
                    <tr>
                        <td>估价目的：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="select4">
                                  <%=mudiListBD() %>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>勘察起始日期：</td>
                        <td style="padding-left: 50px;">
                            <asp:TextBox ID="TextBox1" runat="server" Style="width: 800px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>勘察结束日期：</td>
                        <td style="padding-left: 50px;">
                            <asp:TextBox ID="TextBox2" runat="server" Style="width: 800px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>价值时点：</td>
                        <td style="padding-left: 50px;">
                            <asp:TextBox ID="TextBox3" runat="server" Style="width: 800px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>建议评估单价(元/㎡)：</td>
                        <td style="padding-left: 50px;">
                            <asp:TextBox ID="TextBox4" runat="server" Style="width: 800px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>建筑面积：</td>
                        <td style="padding-left: 50px;">
                            <asp:TextBox ID="TextBox5" runat="server" Style="width: 800px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>估价总值(万元)：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-validatebox" id="zong" type="text" style="width: 800px;" readonly="true" />
                        </td>
                    </tr>
                    <tr>
                        <td>Excel估价计算单：</td>
                        <td style="padding-left: 50px;">
                            <%-- <input class="easyui-validatebox" type="text" style="width: 200px;" />--%>
                            <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
                            <asp:FileUpload ID="FileUpload1" runat="server" />
                            <asp:Button ID="Button1" runat="server" Text="导入" OnClick="Button1_Click" />
                            <asp:Label ID="Label1" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>其他附件（多个文件请使用压缩包）：</td>
                        <td style="padding-left: 50px;">
                            <asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
                            <asp:FileUpload ID="FileUpload2" runat="server" />
                            <asp:Button ID="Button2" runat="server" Text="导入" OnClick="Button2_Click" />
                            <asp:Label ID="Label2" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="text-align: center; padding: 5px">
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">提交</a>
            </div>
        </div>
    </form>
    <script>
        $(function () {
            var zong = ($("#TextBox4").val() * $("#TextBox5").val()) / 10000;
            $("#zong").val(zong);
        })

        function submitForm() {
            var mudi = $("#select4").combobox('getValue');
            var actDate = $("#TextBox1").val();
            var overDate = $("#TextBox2").val();
            var priceDate = $("#TextBox3").val();
            var danjia = $("#TextBox4").val();
            var mianji = $("#TextBox5").val();
            var zong = $("#zong").val();
            var excel = $("#TextBox6").val();
            var fujian = $("#TextBox7").val();
            //项目号
            var proId = $.query.get("id");
            $.ajax({
                type: "post", //要用post方式                 
                url: "PingGuPager.aspx/submintPing",//方法所在页面和方法名
                data: "{'mudi':'" + mudi + "','actDate':'" + actDate + "','overDate':'" + overDate + "','priceDate':'" + priceDate + "','danjia':'" + danjia + "','mianji':'" + mianji + "','zong':'" + zong + "','excel':'" + excel + "','fujian':'" + fujian + "','proId':'" + proId + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    if (result) {
                        $.messager.alert("", "提交成功！");
                    }
                    else
                        $.messager.alert("", "提交失败！");

                }
            })
        }
    </script>
</body>
</html>
